package cn.nbs.admin.service;

import java.util.List;

import cn.nbs.admin.dao.AdminDao;
import cn.nbs.admin.entity.Admin;
import cn.nbs.category.dao.CategoryDao;
import cn.nbs.category.entity.Category;

public class AdminService {
	private AdminDao dao = new AdminDao();
	private CategoryDao  cateDao = new CategoryDao();
	public Admin login(Admin admin) {
		return dao.findNameAndPwd(admin.getAdminname(),admin.getAdminpwd());
	}

	public List<Category> findAll() {
		return cateDao.findAll();
	}

}
